home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / applications / wp / fcmacros.lha / MakeFontTest < prev    next >
Text File  |  1994-03-29  |  2KB  |  74 lines

  1. /* $Id: $ */
  2. /**********************************************************************/
  3. /*
  4.  * Final Copy II Arexx Macro - MakeFontTest
  5.  *
  6.  * Inserts samples of all fonts found in specified dirs
  7.  * (see path definitions and patterns below)
  8.  *
  9.  * Requires: Final Copy II
  10.  * Author: Stefan Winterstein (winter@cs.uni-sb.de)
  11.  * Status: Public Domain
  12.  *
  13.  */
  14. /**********************************************************************/
  15. /*
  16.  * Here you can specify which fonts in which directories will be opened.
  17.  * Remember to adjust 'path.0' to the number of paths.
  18.  */
  19. path.1 = "SWOLFonts:Deco/#?"
  20. path.1 = "SWOLFonts:Type/#?"
  21. path.2 = "SWOLFonts:Sans/~(#?bold#?|#?italic#?)"
  22. path.3 = "SWOLFonts:Serif/~(#?bold#?|#?italic#?)"
  23. path.4 = "SWOLFonts:~(#?bold#?|#?italic#?)"
  24. path.0 = 1
  25.  
  26. /**********************************************************************/
  27. OPTIONS RESULTS
  28. /*
  29.  * Create a sorted file containg all fonts we want to open
  30.  */
  31. fontfiles = ""
  32. DO i=1 FOR path.0
  33.       ADDRESS COMMAND 'List >ram:fontlist.error "'||path.i||'" FILES LFORMAT=%p%n TO RAM:fontlist.'||i
  34.       fontfiles = fontfiles "RAM:fontlist."||i
  35. END i
  36. ADDRESS COMMAND 'Join' fontfiles 'TO RAM:fontlist.unsorted'
  37. ADDRESS COMMAND 'Sort RAM:fontlist.unsorted TO RAM:fontlist'
  38.  
  39. /**********************************************************************/
  40. /*
  41.  * Read fontlist file into variable 'fontlist.'
  42.  */
  43. i = 0
  44. IF OPEN(.infile, "RAM:fontlist", "R") THEN DO
  45.    DO UNTIL EOF(.infile)
  46.      i = i +1
  47.      fontlist.i = READLN(.infile)
  48.    END
  49.    CALL CLOSE(.infile)
  50. END
  51. fontlist.0 = i-1
  52.  
  53. /* ADDRESS COMMAND 'Delete RAM:fontlist#?' */
  54.  
  55. /**********************************************************************/
  56. /*
  57.  * Insert sample for all fonts from 'fontlist.' in FinalCopy
  58.  */
  59. 'FontSize' 18
  60. 'Spacing OneHalf'
  61. DO i=1 FOR fontlist.0
  62.    'Font' fontlist.i
  63.    'Type' "a"    /* else will give old fontname below */
  64.    'Cursor left'
  65.    'Status FontName'
  66.    fontname = result
  67.    'Delete'
  68.    'Type' "Diese Schrift heißt" fontname||"."
  69.    'NewParagraph'
  70. END i
  71.  
  72. /**********************************************************************/
  73. EXIT
  74.